package com.zrrd.jt_admin.common.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author ZhangYK
 * @version 8.0
 * @title RedisTUtils
 * @description
 * @create 2024/7/1 21:43
 */
@Component
public class RedisTUtils {
    @Autowired
    private RedisTemplate redisTemplate;

    //2.添加静态的变量
    public static RedisTemplate redis;

    @PostConstruct
    public void getRedisTemplate() {
        redis = this.redisTemplate;
    }

    //1....其他的工具方法...


}
